

#ifndef SLE_CLIENT_H
#define SLE_CLIENT_H


#include "sle_ssap_client.h"
/* 任务相关 */
#define SLE_SERVER_TASK_PRIO 24
#define SLE_SERVER_STACK_SIZE 0x2000

#define MAX_DATA_SIZE 1024
extern  char data_buffer[MAX_DATA_SIZE];
extern int flag;

#define SLE_UART_CLIENT_MAX_CON         2
extern uint16_t g_sle_con_id[SLE_UART_CLIENT_MAX_CON];
extern uint16_t g_sle_uart_conn_num;

extern ssapc_write_param_t g_sle_send_param;

extern uint8_t Sle_Anounce_Flag;  //通过判断解析后的广播数据有没有指定数据，有的话将该位置对应值，在主函数执行相关操作。


/* 串口接收io */
#define CONFIG_UART_TXD_PIN 17
#define CONFIG_UART_RXD_PIN 18
#define CONFIG_UART_PIN_MODE 1
#define CONFIG_UART_ID UART_BUS_0
void sle_client_init(void);

void sle_uart_start_scan(void);

void sle_uart_notification_cb(uint8_t client_id, uint16_t conn_id, ssapc_handle_value_t *data, errcode_t status);
void sle_uart_indication_cb(uint8_t client_id, uint16_t conn_id, ssapc_handle_value_t *data, errcode_t status);
void app_uart_init_config(void);

extern int8_t row,distance,speeed;
extern uint8_t LOCK_state;

extern int rssi_distance;      //距离

#endif